std::integral_constant

From Cppreference

Jump to: navigation, search
Defined in header <type_traits>

template< class T, T v >
struct integral_constant;
(C++11 feature)

std::integral_constant wraps a static constant of specified type. It is the base class for the C++ type traits.

Contents

[edit] Member types

Type Definition
value_type T
type std::integral_constant<T,v>

[edit] Member constants

Name Value
value static constant expression of type T with value v

[edit] Member functions

operator value_type converts the object to value_type, returns value
(public member function)

[edit] Equivalent definition

[edit] Example

[edit] See also

true_type
false_type
(C++11)
(C++11)
boolean instantiations of integral_constant
(class)